package tsing.javase.excutionorder;

/**
 * @Author Tsing/吴清平
 * @Date 2022/10/20 13:53
 * @Version 1.0
 */
public class Son  extends  Father {

    private int count;

    public Son(int count) {
//        super(count);
        this.count = count;
        System.out.println("son 's 有参构造 is runnnig");
    }

    static {

        System.out.println("son's static bar running");
    }


    {
        System.out.println("son's  bar running");
    }

    @Override
    public  void  method(){
        super.method(); // 执行父类的method()方法
        System.out.println("son 's  method  is runnnig ");
    }

    public Son() {
        System.out.println("son's constructor is running");
    }

    public static void sMethod(){
        System.out.println("son's static method is running");
    }


    public static void main(String[] args) {
        System.out.println("son 's  main() is running");
        Son son = new Son(1);
        son.method();
    }


}
